﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace HA.Data
{
    /// <summary>
    /// 线中直接使用的端点信息
    /// </summary>
    [Serializable]
    public class LineNode:ICloneable
    {
        public LineNode(NodeFO node, double value = 0)
        {
            _id = node.Id;
            _node = node;
            _value = value;
        }

        string _id;
        /// <summary>
        /// 
        /// </summary>
        public string Id
        {
            get { return _id; }
        }

        NodeFO _node;
        /// <summary>
        /// 线端点所引用的基础节点信息
        /// </summary>
        public NodeFO Node
        {
            get { return _node; }
            set { _node = value; }
        }

        double _angle;
        /// <summary>
        /// 与正向X轴所成角度，点移动后无效，需重新计算
        /// </summary>
        public double Angle
        {
            get { return _angle; }
            set { _angle = value; }
        }


        double _value;
        /// <summary>
        /// 存储线端点信息
        /// </summary>
        public double Value
        {
            get { return _value; }
            set { _value = value; }
        }


        public object Clone()
        {
            return MemberwiseClone();
        }
    }
}
